/**
 *
 * @properties={typeid:24,uuid:"A8579BC8-FD91-4142-A4D9-D743283CC984"}
 */
function cancelar() {
	databaseManager.revertEditedRecords()
	salir()
}

/**
 *
 * @properties={typeid:24,uuid:"AA3B4CCD-FECA-4F88-B62E-48E99D8CDAF2"}
 */
function guardar() {
	if (_super.guardar() == true)
	{
		globals.llenarVlHoteles()
		salir()
	}
	else
	{
		globals.DIALOGS.showWarningDialog('Aviso','Ocurrio un error al grabar. Inténtelo nuevamente', 'OK')
	}
}

/**
 * @properties={typeid:24,uuid:"16769404-C819-462C-94C6-BB6A4F4CAFC7"}
 */
function salir()
{
	var $win = application.getWindow('ALTA_HOTEL')
	$win.hide()
	$win.destroy()
}

/**
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"046434E0-7241-4786-86C7-327392BC6F27"}
 */
function onShow(firstShow, event) {
	_super.onShow(firstShow,event)
	controller.newRecord()
	hoteles_to_hoteles_fotos.newRecord()
}
